package com.example.JavaDemo.service.impl;


import com.example.JavaDemo.Mapper.VillageMapper;
import com.example.JavaDemo.domain.Village;
import com.example.JavaDemo.service.IVillageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VillageServiceImpl implements IVillageService {
    @Autowired
    private VillageMapper villageMapper;


    /**
     * 查询小区
     * @param village
     * @return
     */
    @Override
    public List<Village> selectVillage(Village village) {
        return villageMapper.selectVillage(village);
    }
    /**
     * 增加小区
     * @param village
     * @return
     */
    @Override
    public void insertVillage(Village village) {
     villageMapper.insertVillage(village);
    }

    /**
     * 修改小区
     * @param village
     * @return
     */
    @Override
    public void updateVillageById(Village village) {
villageMapper.updateVillageById(village);
    }

    /**
     * 删除小区
     * @param villageId
     * @return
     */
    @Override
    public void delVillageById(String villageId) {
villageMapper.delVillageById(villageId);
    }
}
